package net.lzzy.practices.repositonies;

import net.lzzy.practices.entities.Chapter;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.UUID;

/**
 * @author m
 */
public interface ChapterRepository extends JpaRepository<Chapter, UUID> {
    List<Chapter> findChaptersByCourseIdOrderByUpdateTime(UUID courseId);

    List<Chapter> findChaptersByCourseIdAndOpenOrderByUpdateTimeDesc(UUID id,boolean open);



}
